home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
atmod.arc
/
AT
next >
Wrap
Text File
|
1991-07-29
|
1KB
|
43 lines
;AT Modem communication program written by Doug Cox, January 1990 (using A86)
PREGETSTATUS:
CALL CLSCRN
GETSTATUS:
MOV DX,03FD ;LINE STATUS REGISTER
IN AL,DX
AND AL,1
JZ >L1 ;IF NOTHING FROM MODEM
MOV DX,03F8 ;RECEIVE/TRANSMIT DATA REGISTER
IN AL,DX ;RECEIVE IT
MOV AH,0E ;FUNCTION TO WRITE CHAR ON SCREEN
INT 010
JMP SHORT GETSTATUS
L1:
MOV AH,1 ;FUNCTION TO GET KEYBOARD STATUS
INT 016
JZ GETSTATUS ;IF NO KEYBOARD INPUT
MOV AH,0 ;FUNCTION TO GET KEYBOARD CHAR
INT 016
CMP AX,02E00 ;ALT-C
JE PREGETSTATUS
CMP AX,02D00 ;ALT-X
JE EXIT
CMP AL,01B ;ESC KEY
JE EXIT
MOV DX,03F8 ;RECEIVE/TRANSMIT DATA REGISTER
OUT DX,AL ;SEND IT
JMP SHORT GETSTATUS
EXIT:
CLSCRN:
MOV AX,0700 ;FUNCTION TO CLEAR SCREEN BY SCROLLING IT
MOV BH,7 ;ATTRIBUTE
SUB CX,CX
MOV DX,0184F
INT 010
MOV AH,2 ;FUNCTION TO MOVE CURSOR
SUB BX,BX
SUB DX,DX
INT 010
RET